'\" te
.\" Copyright (c) 1994, Sun Microsystems, Inc., All Rights Reserved
.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
.TH KSTAT_DELETE 9F "Apr 4, 1994"
.SH NAME
kstat_delete \- remove a kstat from the system
.SH SYNOPSIS
.nf
#include <sys/types.h>
#include <sys/kstat.h>



\fBvoid\fR \fBkstat_delete\fR(\fBkstat_t *\fR\fIksp\fR);
.fi

.SH INTERFACE LEVEL
illumos DDI specific (illumos DDI)
.SH PARAMETERS
.ne 2
.na
\fB\fIksp\fR \fR
.ad
.RS 8n
Pointer to a currently installed \fBkstat\fR(9S) structure.
.RE

.SH DESCRIPTION
\fBkstat_delete()\fR removes \fIksp\fR from the \fBkstat\fR chain and frees all
associated system resources.
.SH RETURN VALUES
None.
.SH CONTEXT
\fBkstat_delete()\fR can be called from any context.
.SH SEE ALSO
.BR kstat_create (9F),
.BR kstat_install (9F),
.BR kstat_named_init (9F),
.BR kstat (9S)
.sp
.LP
\fIWriting Device Drivers\fR
.SH NOTES
When calling \fBkstat_delete()\fR, the driver must not be holding that
\fBkstat\fR's \fBks_lock\fR. Otherwise, it may deadlock with a \fBkstat\fR
reader.
